home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
compuserve-file-archive
/
23 Geos Applications
/
GPVIEW.BIN
/
DRIVER.FORMAT
next >
Wrap
Text File
|
2019-04-13
|
5KB
|
132 lines
╨RINTER DRIVER FORMAT FOR ╟EOVIEWER
╘HIS FILE EXPLAINS THE STRUCTURE OF THE PRINTER DRIVER FOR ╟EOVIEWER PROGRAM.
═ANY EXISTING DRIVERS, PARTICULARLY THOSE WRITTEN FOR ╟┼╧╙, CAN BE MODIFIED
TO WORK WITH ╟EOVIEWER WITH FAIRLY SMALL CHANGES.
╔N THE FOLLOWING KNOWLEDGE OF MACHINE LANGUAGE IS ASSUMED.
-------------------------------------------------------------------------------
╙TRUCTURE OF PRINTER DRIVER FILE
1) ╞ILE NAME - ╘HE FIRST SEVEN CHARACTERS OF THE FILE NAME MUST BE "╟┼╧╨╥╘.",
IN ╨┼╘ ┴╙├╔╔, THAT IS $47,$45,$4╞,$50,$52,$54,$2┼.
╘HE REMAINING CHARACTERS IN THE FILE NAME CAN BE ANYTHING AND CAN BE USED
TO DESIGNATE A SPECIFIC PRINTER.
2) ╞ILE TYPE OF THE DRIVER MUST BE ╨╥╟. ╘HE LOAD ADDRESS IS $1800.
3) ╘HE DRIVER RESIDES AT $1800-$1╞╞╞. ╘HAT IS THE PROGRAM MUST BE 2╦ IN SIZE
AT THE MOST. ╘HIS IS MORE THAN ENOUGH FOR MOST PRINTERS.
╬OTE THAT ONLY THE FIRST 2╦ OF THE DRIVER FILE WILL BE LOADED BY THE MAIN
PROGRAM, EVEN IF THE DRIVER FILE IS LARGER THAN THE LIMIT.
4) ╘HE FIRST NINE BYTES OF THE DRIVER PROGRAM MUST BE A JUMP TABLE AS FOLLOWS:
1800 ╩═╨ ╔╬╔╘
1803 ╩═╨ ╨╥╔╬╘
1806 ╩═╨ ┼╬─
╔╬╔╘, ╨╥╔╬╘ AND ┼╬─ ARE ADDRESSES OF SUBROUTINES WITHIN THE DRIVER.
╘HEY ARE EXPLAINED BELOW.
5) ╘HE NEXT EIGHT BYTES OF THE FILE, I.E., $1809-$1810 SHOULD BE CHARACTERS
(NEED NOT BE IN ╨┼╘ ┴╙├╔╔), WHICH ARE TO DESIGNATE A NAME FOR THE DRIVER.
╬OTE THAT THESE EIGHT CHARACTERS ARE USED FOR DISPLAY PURPOSES IN THE MAIN
PROGRAM AND NOT THE FILE NAME.
-------------------------------------------------------------------------------
╙UBROUTINES
╘HE DRIVER CONSISTS OF THREE SUBROUTINES CORRESPONDING TO THE JUMP TABLE
LISTED ABOVE. ╘HEY ARE:
1) ╔╬╔╘ - ╘HIS SUBROUTINE IS CALLED FIRST BY THE MAIN PROGRAM. ╔T CAN BE USED
TO INITIALIZE PRINTER AND/OR INTERFACE, SET THE PRINTER TO DOT GRAPHIC MODE
, ETC. ╔TS MAIN PURPOSE, HOWEVER, IS TO DETECT THE PRESENCE OF THE PRINTER.
╘HIS SUBROUTINE ═╒╙╘ RETURN WITH CARRY FLAG CLEAR OR SET, ACCORDING TO
WHETHER THE DEVICE IS PRESENT OR NOT, RESPECTIVELY.
2) ╨╥╔╬╘ - ╘HIS IS THE MAIN PRINT SUBROUTINE. ╫HEN THIS ROUTINE IS CALLED BY
THE MAIN PROGRAM, THE FOLLOWING DATA ARE SUPPLIED:
($02,$03): ╘HESE TWO ZERO PAGE LOCATIONS CONTAIN THE ADDRESS OF THE START
OF A 640 BYTE BUFFER (LOW BYTE FIRST).
╘HIS BUFFER CONTAINS THE BITMAP DATA TO BE PRINTED, ARRANGED AS 80 CARDS.
┼ACH CARD CONSTITUTES OF EIGHT CONSECUTIVE BYTES AND REPRESENTS AN 8X8
PIXELS AREA OF THE SCREEN. ╘HE 640 BYTES REPRESENT ONE ROW OF THE ╟┼╧╨┴╔╬╘
FILE.
($04,$05): ╨OINTER TO THE START OF AN AUXILIARY 640 BYTE BUFFER. ╘HIS
BUFFER CONTAINS NO DATA. ╔T CAN BE USED AS A WORK BUFFER OR STORAGE AREA,
FOR INSTANCE, FOR PRINTERS WHICH USE HEADS WITH MORE OR LESS THAN 8 PINS.
($06,$07): ╨OINTER TO THE START OF AN 80 BYTE BUFFER. ╘HESE ARE COLOR DATA.
┼ACH BYTE IS THE COLOR DATA OF ONE OF THE CARDS OF BITMAP DATA. ╘HE HIGH/
LOW NIBBLE OF EACH BYTE IS THE COLOR OF ON/OFF BITS IN THE CORRESPONDING
CARD. ╘HE COLOR DATA IS PROVIDED IN CASE THE PRINTER HAS COLOR CAPABILITY.
╔T IS NOT NEEDED FOR DOT MATRIX PRINTERS.
($08,$09): ╨OINTER TO THE START OF AN AUXILIARY 80 BYTE BUFFER, WHICH CAN
BE USED AS A WORK BUFFER.
╘HE ╨╥╔╬╘ ROUTINE SHOULD FORMAT THE DATA IN DATA BUFFERS, USING WORK BUFFERS
IF NECESSARY, AND SEND THEM TO THE PRINTER. ┼ACH CALL PRINTS ONE ROW OF THE
╟┼╧╨┴╔╬╘ FILE.
╬OTE THAT THE ADDRESESS OF THE AUXILIARY BUFFERS AND THEIR CONTENTS STAY THE
SAME EACH TIME ╨╥╔╬╘ IS CALLED BY THE MAIN PROGRAM. ┬UT DATA BUFFERS WILL HAVE
FRESH DATA WITH EACH CALL.
3) ┼╬─ - ╘HIS ROUTINE IS CALLED AT THE END BY THE MAIN PROGRAM. ╔T IS USED TO
SEND APPROPRIATE COMMANDS TO THE PRINTER TO END PRINTING.
-------------------------------------------------------------------------------
═EMORY USAGE AND ╦ERNAL ROUTINES
╔N ADDITION TO LOCATIONS CONTAINING BUFFER ADDRESSESS, THE ZERO PAGE LOCATIONS
$0┴ TO $10 CAN BE USED IF NEEDED.
┼XCEPT FOR THE ZERO PAGE LOCATIONS MENTIONED, THE BUFFERS PROVIDED, AND THE
DRIVER AREA $1800-$1╞╞╞, ╬╧ ╧╘╚┼╥ ╨┴╥╘ ╧╞ ╘╚┼ ╙┘╙╘┼═ ═┼═╧╥┘ ╙╚╧╒╠─ ┬┼ ╒╙┼─.
(EXCEPT THOSE NEEDED IN NORMAL ╔/╧ OPERATIONS LIKE ╦ERNAL STATUS WORD $90).
╞AILURE IN THIS WOULD CAUSE UNPREDICTABLE RESULTS.
╙YSTEM CONTROL REGISTERS, TIMING AND INTERRUPTS AND ╔/╧ DEVICES SHOULD NOT BE
DISTURBED.
╧F THE ╦ERNAL ROUTINES THE FOLLOWING ARE ALL THAT IS NEEDED:
╠╔╙╘┼╬ $╞╞┬1
╙┼├╧╬─ $╞╞93
├╔╧╒╘ $╞╞┴8
╒╬╠╙╬ $╞╞┴┼
╧R IN CASE A LOGICAL FILE IS USED:
╙┼╘╠╞╙ $╞╞┬┴
╙┼╘╬┴═ $╞╞┬─
╧╨┼╬ $╞╞├0
├╚╦╧╒╘ $╞╞├9
├╚╥╧╒╘ $╞╞─2
├╠╥├╚╬ $╞╞├├
├╠╧╙┼ $╞╞├3
╫HEN RETURNING FROM THE DRIVER TO THE MAIN PROGRAM, ╒╬╠╙╬ MUST BE SENT TO THE
PRINTER IN THE FIRST CASE. ╔N THE SECOND CASE, ALL CHANNELS MUST BE CLEARED
AND LOGICAL FILES CLOSED.
-------------------------------------------------------------------------------
╫ITH THIS PACKAGE A SAMPLE PRINTER DRIVER FILE IS SUPPLIED. ╘HE FILE NAME IS
"╟┼╧╨╥╘.┼╨╙╧╬-90". ╔T IS A FAIRLY SIMPLE ┼PSON COMPATIBLE PRINTER DRIVER WHICH
PRINTS AT THE DENSITY OF 90 ─╨╔.
┘OU ARE WELCOME TO EXAMINE IT TO BECOME MORE FAMILIAR WITH THE FORMAT USED IN
THE PRINTER DRIVERS FOR ╟EOVIEWER.
-------------------------------------------------------------------------------
╙IAMAK ┴NSARI - ╬OV 1991